/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package CareerService.Entitybeans;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Administrator
 */
@Entity
@Table(name = "cvdownlist")
@NamedQueries({@NamedQuery(name = "Cvdownlist.findAll", query = "SELECT c FROM Cvdownlist c"), @NamedQuery(name = "Cvdownlist.findById", query = "SELECT c FROM Cvdownlist c WHERE c.id = :id"), @NamedQuery(name = "Cvdownlist.findByStunum", query = "SELECT c FROM Cvdownlist c WHERE c.stunum = :stunum"), @NamedQuery(name = "Cvdownlist.findByDownloadTime", query = "SELECT c FROM Cvdownlist c WHERE c.downloadTime = :downloadTime")})
public class Cvdownlist implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "stunum")
    private int stunum;
    @Basic(optional = false)
    @Column(name = "download_time")
    @Temporal(TemporalType.TIMESTAMP)
    private Date downloadTime;
    @JoinColumn(name = "emnum", referencedColumnName = "emnum")
    @ManyToOne(optional = false)
    private Employer emnum;

    public Cvdownlist() {
    }

    public Cvdownlist(Integer id) {
        this.id = id;
    }

    public Cvdownlist(Integer id, int stunum, Date downloadTime) {
        this.id = id;
        this.stunum = stunum;
        this.downloadTime = downloadTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public int getStunum() {
        return stunum;
    }

    public void setStunum(int stunum) {
        this.stunum = stunum;
    }

    public Date getDownloadTime() {
        return downloadTime;
    }

    public void setDownloadTime(Date downloadTime) {
        this.downloadTime = downloadTime;
    }

    public Employer getEmnum() {
        return emnum;
    }

    public void setEmnum(Employer emnum) {
        this.emnum = emnum;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Cvdownlist)) {
            return false;
        }
        Cvdownlist other = (Cvdownlist) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "CareerService.Entitybeans.Cvdownlist[id=" + id + "]";
    }

}
